import { FieldType } from 'choerodon-ui/pro/lib/data-set/enum';

function handleDataSetChange({ value, oldValue }: { value: Date, oldValue: Date }) {
    console.log('[range dataset newValue]', value, '[oldValue]', oldValue);
}

 const timeDataSet = () => (
    {
        autoCreate: true,
        fields: [
            {
                name: 'time',
                type: FieldType.time,
                format: 'hh:mm:ss A',
            },
            {
                name: 'time2',
                type: FieldType.time,
                format: 'h:mm a',
            },
        ],
        events: {
            update: handleDataSetChange,
        },
    }
);

export default timeDataSet;